import Router from "./util/router/index.ts"
import { NavWrapper, NavItem } from "./components/sideBar.ts"
/**@type {{path,title,name,jsName?,cssName?}[]}}*/
const CONFIG = require('./CONFIG.js');
let app = document.getElementById("app");
let router = new Router(app, CONFIG, {
    title: "404",
    path: "/pc/login"
});
let header = document.getElementById("header");
router.install();
router.afterEachEnter(function(from, to) {
        if (router.currentRoute.header) {
            header.classList.remove("hide")
            app.setAttribute('style', 'height:calc(100vh - 4rem)');
        } else {
            header.classList.add("hide")
            app.setAttribute('style', 'height:calc(100vh)');
        }
    })
    // router.push("/pc/login");